<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>鲜花表白</title>
		<style>
			*{
			    margin: 0;
			    padding: 0;
			    list-style: none;
			}
			
			#love{
				display: none;
				
				
			}
			#time{
				text-align: center;
				font-size: 100px;
				color: red;
			}		
			
	</style>
	</head>
	
	<body>
		<center><div id="time">5</div>
		<img id="love"  src="img/表白.gif" /></center>
		
	</body>
	<script>
		
		window.onload = function(){
			
		var	timer = setInterval(function(){
				$("time").innerText-=1;
				
				if($("time").innerText === "0"){
					clearInterval(timer);
					$("time").style.display = "none";
					$("love").style.display = "block";}
			},1000)
			
			function $(id){
				return typeof id ==="string"?document.getElementById(id):null;
			}
		}
	</script>
</html>
